Skip to content

London | 26-ITP-May | Remi M. | Sprint 3 | 2-practice-tdd#1326

Open
remimarcelle wants to merge 3 commits into
CodeYourFuture:mainfrom
remimarcelle:coursework/sprint-3-practice-tdd
Open

London | 26-ITP-May | Remi M. | Sprint 3 | 2-practice-tdd#1326
remimarcelle wants to merge 3 commits into
CodeYourFuture:mainfrom
remimarcelle:coursework/sprint-3-practice-tdd

Conversation

@remimarcelle
Copy link
Copy Markdown

@remimarcelle remimarcelle commented May 25, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Completed implement and rewrite jest tests and practicing test driven development exercises and tests.

@github-actions

This comment has been minimized.

4 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@remimarcelle remimarcelle added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 25, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 25, 2026
@remimarcelle remimarcelle force-pushed the coursework/sprint-3-practice-tdd branch from d7628a7 to 5e37cc1 Compare May 25, 2026 03:04
@remimarcelle remimarcelle added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 3 Assigned during Sprint 3 of this module Module-Structuring-And-Testing-Data The name of the module. labels May 25, 2026
@remimarcelle
Copy link
Copy Markdown
Author

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Could consider testing a few more samples in this script - higher chance to detect bugs in code.

  • The original specification did not clearly state whether the character match should be case-sensitive.
    Most people would probably assume that it is, but to demonstrate our understanding or clarify the assumption we made, we could add test cases to convey this. For examples,

    • A case to show that the match is case sensitive
    • A case to show that the function is expected to work also for non-alphabets

*
* @param {string} stringOfCharacters - The string to search through.
* @param {string} findCharacter - The single character to count.
* @returns {number} The number of times findCharacter appears in stringOfCharacters.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent documentation work here!

// Case 5: All other numbers
// When the number does not end with 1, 2, or 3 (and is not an exception),
// Then the function should return a string by appending "th" to the number.
test("should append 'th' for all other numbers", () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a test fails with the message "... all other numbers", it may be unclear what "other numbers" actually refers to.
Can you revise the test description to make it more informative?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried running this script to ensure everything works as expected?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete Sprint 3 practice TDD coursework 26-ITP-May | Structuring and testing data | Remi M.

2 participants